/*
    该文件专门为Count组件提供action对象
*/
export const INCREMENT = 'INCREMENT';
export const DECREMENT = 'DECREMENT';

// 同步action
export const incrementAction = (data) => ({ type: INCREMENT, data });
export const decrementAction = (data) => ({ type: DECREMENT, data });

// 异步action
export const incrementAsyncAction = (data, time) => {
    return (dispatch) => {
        setTimeout(() => {
            dispatch(incrementAction(data));
        }, time);
    }
}